Skip to content

Conversation

@RulaKhaled
Copy link
Member

This PR adds support for Vercel AI SDK v6 telemetry changes.

Changes

Provider Metadata Updates

  • Added azure key to ProviderMetadata interface for Azure Responses API (v6 uses azure instead of openai for Azure provider)
  • Added vertex key for Google Vertex provider (v6 uses vertex instead of google)
  • Updated addProviderMetadataToAttributes to check both old and new keys for backward compatibility

V6 Test Suite

  • Added integration tests for Vercel AI SDK v6 using MockLanguageModelV3
  • Updated mock scenarios to match v6's new data structures:
    • usage now uses object format: { total, noCache, cached }
    • finishReason now uses object format: { unified, raw }
  • Added vercel.ai.request.headers.user-agent attribute to test expectations

Closes #18691

@linear
Copy link

linear bot commented Jan 8, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,164 - 8,796 +4%
GET With Sentry 1,664 18% 1,689 -1%
GET With Sentry (error only) 6,109 67% 5,873 +4%
POST Baseline 1,188 - 1,171 +1%
POST With Sentry 573 48% 580 -1%
POST With Sentry (error only) 1,063 89% 1,051 +1%
MYSQL Baseline 3,375 - 3,182 +6%
MYSQL With Sentry 468 14% 427 +10%
MYSQL With Sentry (error only) 2,692 80% 2,606 +3%

View base workflow run

@RulaKhaled RulaKhaled requested a review from nicohrubec January 8, 2026 16:30
Copy link
Member

@nicohrubec nicohrubec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

dsn: 'https://[email protected]/1337',
tracesSampleRate: 0,
debug: false,
release: '1.0',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a question: is there any specific reason we set this here?

Copy link
Member Author

@RulaKhaled RulaKhaled Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not that i know of, this is just copied from v5

ai: '^6.0.0',
},
},
);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate test case runs the same test twice

Low Severity

The test 'creates ai related spans with v6' at lines 562-576 is an exact duplicate of the test 'creates ai related spans with sendDefaultPii: false' at lines 410-424. Both use the same scenario.mjs, instrument.mjs, EXPECTED_TRANSACTION_DEFAULT_PII_FALSE, and ai: '^6.0.0' dependency. This appears to be leftover code that wastes CI resources by running the identical test suite twice.

Additional Locations (1)

Fix in Cursor Fix in Web

@RulaKhaled RulaKhaled merged commit dbe6520 into develop Jan 9, 2026
208 checks passed
@RulaKhaled RulaKhaled deleted the rolaabuhasna/js-1399-support-v6-of-vercel-ai branch January 9, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support v6 of Vercel AI

3 participants